import Vue from 'vue'
import App from './App.vue'

import VueRouter from 'vue-router';
import Find from './views/find.vue';
import My from './views/my.vue';
import Part from './views/part.vue';
import NotFound from './views/NotFound.vue';

Vue.use(VueRouter)

let routes = [{
    path: "/",
    redirect: '/find'
  }, {
    path: "/find",
    name: "Find",
    component: Find
  },
  {
    path: "/my",
    name: "My",
    component: My
  },
  {
    path: "/part",
    name: "Part",
    component: Part
  }, {
    path: "/part/:username",
    component: Part
  },
  {
    path: "*",
    component: NotFound
  },
]

let router = new VueRouter({
  routes
})

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  router,
  mode: 'history'
}).$mount('#app')